<template>
	<view>
		<view class="nulls" v-if="list==''">
			暂无服务顾问
		</view>
		<view v-if="list!=''">
			<view class=" hash-box " :style="'background-image: url('+appConfig.center_setting.top_bg_image+')'">
				<view class="boxpos flex-start">
					<view class="avatarbox">
						<image class="avatar" :src="list.avatar" mode=""></image>
					</view>
					<view class="boxs">
						<view class="mobile">顾问昵称：{{list.nickname||"-"}}</view>
						<view class="mobile">顾问姓名：{{list.real_name||"-"}}</view>
						<view class="mobile" v-if="list.mobile!=''">顾问电话：{{list.mobile||"-"}}</view>
						<view class="mobile" v-else>顾问电话：-</view>
					</view>
				</view>
				<view class="hash-remark">{{list.level_info.remark}}</view>
			</view>
		</view>
		<view class="info" v-if="data!=''">
			<view class="title">{{data.shop_info.name}}</view>
			<view class="runtime">营业时间：{{data.shop_info.run_start_time_text}} - {{data.shop_info.run_end_time_text}}</view>
			<view class="text">门店照片</view>
			<view class="imgbox flex-start">
				<image v-for="(item,index) in data.door_img" :src="item" mode="aspectFill" @click="apifun.previewImage(item)"></image>
			</view>
			<view class="text">店内照片</view>
			<view class="imgbox flex-start">
				<image v-for="(item,index) in data.indoor_img" :src="item" mode="aspectFill" @click="apifun.previewImage(item)"></image>
			</view>
			<view class="text">导购员照片</view>
			<view class="imgbox flex-start">
				<image v-for="(item,index) in data.sales_img" :src="item" mode="aspectFill" @click="apifun.previewImage(item)"></image>
			</view>
			<view class="flex-s addressbox">
				<view class="address">地址：{{data.all_name}}</view>
			<!-- 	<button class="share" open-type="share" hover-class="none">
					<view class="flex-start">
						<uni-icons type="redo" size="22"></uni-icons><view>分享</view>
					</view>
				</button> -->
			</view>
		</view>
		<!-- <view>
			<image class="topImg" :src="banner_list.image" mode=""></image>
			<view class="box">
				<view class="row" v-for="(item,index) in baodata.goods_list" @click="getTo(item.id)">
					<view class="imgBox">
						<image class="serial" v-if="index==0" src="../../static/image/Groupx1.png" mode=""></image>
						<image class="serial" v-if="index==1" src="../../static/image/Groupx2.png" mode=""></image>
						<image class="serial" v-if="index==2" src="../../static/image/Groupx3.png" mode=""></image>
						<image class="serial" v-if="index==3" src="../../static/image/Groupx4.png" mode=""></image>
						<view class="price"><price-format :color="'#FFFFFF'" class="m-r-10" :first-size="28" :second-size="26"
						:subscript-size="26" :price="item.min_price" :weight="500"></price-format></view>
						<image class="shopImg" :src="item.image" mode=""></image>
					</view>
					<view class="content">
						<view class="name">{{item.name}}</view>
						<view class="remark">{{item.remark}}</view>
					</view>
				</view>
			</view>
			<image class="bottomImg" :src="bottom_list.image" mode=""></image>
		</view> -->
	</view>
</template>

<script>
	import {
		getPidShopInfo,getUserShopInfo
	} from '@/api/user';
	import {recommend} from '@/api/store';
	export default {
		data() {
			return {
				shop_id:'',
				list:[],
				data:[],
				baodata:[],
				banner_list:[],
				bottom_list:[],
			}
		},
		onLoad() {
			this.shop_id = uni.getStorageSync('bao_shopId')
			this.PidShopInfo();
			// this.getrecommend()
			this.getUserShopInfo()
		},
		methods: {
			getTo(id){
				uni.navigateTo({
					url:'/bundle/pages/goodsDetail/index?id='+id
				})
			},
			async getUserShopInfo() {
				const res = await getUserShopInfo();
				this.data = res.data;
			},
			async PidShopInfo() {
				const res = await getPidShopInfo();
				this.list = res.data;
			},
			// getrecommend(){
			// 	recommend({
			// 		shop_id:this.shop_id
			// 	}).then(({
			// 		data
			// 	}) => {
			// 	this.baodata= data;
			// 	this.banner_list= data.banner_list;
			// 	this.bottom_list= data.bottom_list;
			// 	})
			// },
		}
	}
</script>

<style>
	.info{
		border-radius: 14rpx;
		padding: 30rpx 20rpx;
		background-color: #fff;
	}
	.title{
		font-size: 32rpx;
		font-weight: 900;
		margin-bottom: 30rpx;
	}
	.text{
		font-size: 28rpx;
		margin-top: 16rpx;
		margin-bottom: 10rpx;
	}
	.imgbox{
		margin-left: 26rpx;
	}
	.imgbox image{
		width: 180rpx;
		height: 110rpx;
		margin-right: 14rpx;
		border-radius: 10rpx;
	}
	.addressbox{
		margin-top: 34rpx;
		border-top: 1rpx solid #f4f3f3;
	}
	.address{
		/* width: 540rpx; */
		font-size: 30rpx;
		font-weight: 900;
	}
	.share::after {
		border: none;
		border-radius: none;
	}
	.share {
		line-height: 88rpx;
		padding: 0 !important;
	}
	page {
		background-color: #fff;
	}
	.nulls{
		margin-top: 400rpx;
		text-align: center;
	}
	.hash-box {
		background-image: url(https://fx.senge.com/uploads/images/20230510165947d310c9794.png);
		background-repeat: no-repeat;
		background-size: 100% auto;
		height: 352rpx;
		/* margin: 0 auto; */
	}
	.boxpos{
		padding: 40rpx 40rpx 40rpx 40rpx;
	}
	.boxs {
	}
	.avatarbox {
		width: 150rpx;
		height: 150rpx;
	}
	.avatar {
		width: 150rpx;
		height: 150rpx;
		border-radius: 100rpx;
	}

	.mobile {
		color: #fff;
		font-size: 30rpx;
		margin-left: 30rpx;
	}
	.hash-remark{
		padding: 0 24rpx;
		color: #fff;
	}
	page{
		padding-bottom: 60rpx;
	}
	.box{
		display: flex;
		flex-wrap:wrap;
		padding-top: 30rpx;
	}
	.topImg{
		width: 750rpx;
		height: 390rpx;
	}
	.row{
		width: 300rpx;
		margin-left: 50rpx;
		margin-bottom: 60rpx;
		margin-top: 20rpx;
	}
	.imgBox{
		position: relative;
		text-align: center;
		width: 92%;
		margin: 0 auto;
	}
	.price{
		background-color: #eb746e;
		width: 110rpx;
		font-size: 28rpx;
		color: #ffffff;
		position: absolute;
		top: 0;
		z-index: 20;
		text-align: center;
		padding: 2rpx 0;
		padding-left: 8rpx;
	}
	.shopImg{
		width: 100%;
		height: 228rpx;
		z-index: 9;
	}
	.content{
		background-color: #f0d5ad;
		height: 200rpx;
		margin-top: -80rpx;
		padding-top: 82rpx;
		text-align: center;
	}
	.name{
		margin-top: 4rpx;
		font-size: 24rpx;
		color: #000;
	}
	.remark{
		font-size: 22rpx;
		color: #7C141C;
		margin-top: 4rpx;
	}
	.bottomImg{
		width: 676rpx;
		height: 192rpx;
		margin-left: 34rpx;
	}
	.serial{
		z-index: 21;
		width: 76rpx;
		height: 76rpx;
		position: absolute;
		right: -20rpx;
		top: -20rpx;
	}
</style>
